package com.example.recall_application.utils;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class TimeUtils {
    /**
     * 得到几天前的时间的字符串时间戳
     * @param d
     * @param day
     * @return
      */
    public static String getDateBefore(Date d, int day){
        Calendar now =Calendar.getInstance();
        now.setTime(d);
        now.set(Calendar.DATE,now.get(Calendar.DATE)-day);
        return String.valueOf(now.getTime().getTime());
    }
}
